package HomeWork;

import java.util.Scanner;

public class Erroneous {

    public int div(String x, String y) throws ArithmeticException, NumberFormatException {

        int result=0;

        int a=Integer.parseInt(x);
        int b=Integer.parseInt(y);

        result=a/b;
        return result;

    }


    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String x=scanner.next();
        String y=scanner.next();
        Erroneous erroneous = new Erroneous();

        try {
            System.out.println(erroneous.div(x,y));
        } catch (ArithmeticException cw) {
            System.out.println("发生了数学错误");
        } catch (NumberFormatException cw) {
            System.out.println("数字格式化异常");
        }catch (Exception cw){
            System.out.println("发生了异常");
        }
    }
}